{% extends 'base.html' %}
{% block content%}
    <p>
        {% for item in user.get_profile.unit_access.all %}

        {% if item.id != u.id %}
            <a href="{% url vac_list_year item.id year_now %}">{{ item.abb }}</a>
        {% endif %}

        {% endfor %}
    </p>
    <div class="clear"></div>

<div class="grid_11">
    <p>{% if prev_year %}<strong><a href="{% url vac_list_year u_id prev_year %}"> <<< </a></strong>{% endif %}
            <strong style="font-size:20px;">{{ year_now }}</strong>
           {% if next_year %}<strong><a href="{% url vac_list_year u_id next_year %}"> >>> </a></strong>{% endif %}
        </p>
</div>
    <table class="forma">
    <tr style="background-color:#90EE90;"><td> <strong>Сотрудники</strong></td><td> <strong>Отпуска</strong></td></tr>
{% for emp in employee_list %}
    <tr class="{% cycle "color1" "color2" %}"><td>
    <strong><a href="{% url vacations_by_employee emp.id %}">{{ emp }}</a></strong>
    </td>
    <td>
                            {% for vac in vac_list %}
                                    {% if emp == vac.employee %}
                                        <strong><span style="color:green;">{% if vac.a_vacation1 %}{{ vac.a_vacation1 }}{% endif %}</span> &nbsp;&nbsp;<span style="color:green;">{% if vac.a_vacation2 %}{{ vac.a_vacation2 }}{% endif %}</span></span></strong>
                                    {% endif %}
                            {% endfor %}</td>
    </tr>
{% endfor %}
    </table>

{% endblock %}